/**
 * 
 */
package ${basePackage}.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ${basePackage}.dao.I${className}Dao;
import ${basePackage}.model.${className};
import ${basePackage}.model.${className}Example;
import ${basePackage}.service.I${className}Service;

/**
 * 
 * @content
 * 
 * @date ${createDate}
 * 
 * @author OprCalf
 * 
 */
@Service
public class ${className}ServiceImpl implements I${className}Service {

	@Autowired
	private I${className}Dao ${classNameLower}Dao;

	@Override
	public long countByExample(${className}Example example) {
		return ${classNameLower}Dao.countByExample(example);
	}

	@Override
	public int deleteByExample(${className}Example example) {
		return ${classNameLower}Dao.deleteByExample(example);
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return ${classNameLower}Dao.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(${className} record) {
		return ${classNameLower}Dao.insert(record);
	}

	@Override
	public int insertSelective(${className} record) {
		return ${classNameLower}Dao.insertSelective(record);
	}

	@Override
	public int insertList(List<${className}> records) {
		for (${className} record : records) {
			insert(record);
		}
		return 1;
	}

	@Override
	public List<${className}> selectByExample(${className}Example example) {
		return ${classNameLower}Dao.selectByExample(example);
	}

	@Override
	public ${className} selectByPrimaryKey(Integer id) {
		return ${classNameLower}Dao.selectByPrimaryKey(id);
	}

	@Override
	public int updateByExampleSelective(${className} record, ${className}Example example) {
		return ${classNameLower}Dao.updateByExampleSelective(record, example);
	}

	@Override
	public int updateByExample(${className} record, ${className}Example example) {
		return ${classNameLower}Dao.updateByExample(record, example);
	}

	@Override
	public int updateByPrimaryKeySelective(${className} record) {
		return ${classNameLower}Dao.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(${className} record) {
		return ${classNameLower}Dao.updateByPrimaryKey(record);
	}

}
